<template>
  <div>
    <el-menu
      @close="handleClose"
      @open="handleOpen"
      active-text-color="#ffd04b"
      background-color="#545c64"
      class="el-menu-vertical-demo"
      text-color="#FBFBFB"
      width="200px"
      router
    >
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-user"></i>
          <span>商家管理</span>
        </template>
        <el-menu-item index="/seller"><i class="el-icon-user-solid" ></i>商家管理</el-menu-item>
      </el-submenu>
      <el-submenu index="2">
        <template slot="title">
          <i class="el-icon-setting"></i>
          <span>菜品管理</span>
        </template>
        <el-menu-item index="/category"><i class="el-icon-menu"></i>分类管理</el-menu-item>
        <el-menu-item index="/food"><i class="el-icon-menu"></i>菜品管理</el-menu-item>
      </el-submenu>
      <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-setting"></i>
          <span>订单管理</span>
        </template>
        <el-menu-item index="/order"><i class="el-icon-s-custom"></i>订单管理</el-menu-item>
      </el-submenu>
      <el-submenu index="4">
        <template slot="title">
          <i class="el-icon-setting"></i>
          <span>用户管理</span>
        </template>
        <el-menu-item index="/user"><i class="el-icon-s-custom"></i>用户管理</el-menu-item>
      </el-submenu>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: "TEMPLATE",
  data() {
    return {

    }
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style scoped>
/deep/ .el-submenu__title {
  width: 200px;
}

/deep/ .el-menu-item-group__title {
  width: 200px;
}
</style>
